package com.atnjupt.dao.impl;

import com.atnjupt.bean.OrderItem;
import com.atnjupt.dao.OrderItemDao;

/**
 * @author Wizarder
 * @create 2021-06-11 15:49
 */
public class OrderItemDaoImpl extends  BaseDao<OrderDaoImpl> implements OrderItemDao {
    @Override
    public int saveOderItem(OrderItem orderItem) {
        String sql = "insert into t_order_item(name,count,price,total_price,order_id) values(?,?,?,?,?)";
        return update(sql,orderItem.getName(),orderItem.getCount(),orderItem.getPrice(),orderItem.getTotalPrice(),orderItem.getOrderId());
    }
}
